package com.valuegroup.smarttodo.data.model;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;

import java.io.Serializable;
import java.util.Date;

/**
 * 事件
 */
@Entity
public class Event implements Serializable {
    private static final long serialVersionUID = -7660256072299967029L;
    @Id(autoincrement = true)
    private Long id;
    private String title;

    // 来源
    private Long sourceId;
    // 事务类型
    private Integer eventType;

    // 事务计划截止时间
    private Date sourceEndDt;
    // 事务来源年
    private Integer sourceYear;
    // 事务来源季度
    private Integer sourceQuarter;
    // 事务来源月份
    private Integer sourceMonth;

    // 预计时长
    private Integer preMinute;

    // 事件是否已安排
    private Boolean joinSchedule;
    // 事件安排时间
    private Date joinScheduleDt;

    // 事件计划执行周 201901(年份*100+周数)
    private Integer scheduleWeekNum;
    // 事件计划执行时间
    private Date scheduleDt;


    // 事件已完成
    private Boolean finish;
    // 事件完成时间
    private Date finishDt;

    // 自动续学事件(用于学习事件)
    @NotNull
    private Boolean autoContinue;

    @NotNull
    private Date createdDt;
    @NotNull
    private Date updatedDt;
    @NotNull
    private Integer status;

    @Generated(hash = 434808845)
    public Event(Long id, String title, Long sourceId, Integer eventType,
                 Date sourceEndDt, Integer sourceYear, Integer sourceQuarter,
                 Integer sourceMonth, Integer preMinute, Boolean joinSchedule,
                 Date joinScheduleDt, Integer scheduleWeekNum, Date scheduleDt,
                 Boolean finish, Date finishDt, @NotNull Boolean autoContinue,
                 @NotNull Date createdDt, @NotNull Date updatedDt,
                 @NotNull Integer status) {
        this.id = id;
        this.title = title;
        this.sourceId = sourceId;
        this.eventType = eventType;
        this.sourceEndDt = sourceEndDt;
        this.sourceYear = sourceYear;
        this.sourceQuarter = sourceQuarter;
        this.sourceMonth = sourceMonth;
        this.preMinute = preMinute;
        this.joinSchedule = joinSchedule;
        this.joinScheduleDt = joinScheduleDt;
        this.scheduleWeekNum = scheduleWeekNum;
        this.scheduleDt = scheduleDt;
        this.finish = finish;
        this.finishDt = finishDt;
        this.autoContinue = autoContinue;
        this.createdDt = createdDt;
        this.updatedDt = updatedDt;
        this.status = status;
    }

    @Generated(hash = 344677835)
    public Event() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getSourceId() {
        return this.sourceId;
    }

    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }

    public Integer getEventType() {
        return this.eventType;
    }

    public void setEventType(Integer eventType) {
        this.eventType = eventType;
    }

    public Date getSourceEndDt() {
        return this.sourceEndDt;
    }

    public void setSourceEndDt(Date sourceEndDt) {
        this.sourceEndDt = sourceEndDt;
    }

    public Integer getSourceYear() {
        return this.sourceYear;
    }

    public void setSourceYear(Integer sourceYear) {
        this.sourceYear = sourceYear;
    }

    public Integer getSourceQuarter() {
        return this.sourceQuarter;
    }

    public void setSourceQuarter(Integer sourceQuarter) {
        this.sourceQuarter = sourceQuarter;
    }

    public Integer getSourceMonth() {
        return this.sourceMonth;
    }

    public void setSourceMonth(Integer sourceMonth) {
        this.sourceMonth = sourceMonth;
    }

    public Integer getPreMinute() {
        return this.preMinute;
    }

    public void setPreMinute(Integer preMinute) {
        this.preMinute = preMinute;
    }

    public Boolean getJoinSchedule() {
        return this.joinSchedule;
    }

    public void setJoinSchedule(Boolean joinSchedule) {
        this.joinSchedule = joinSchedule;
    }

    public Date getJoinScheduleDt() {
        return this.joinScheduleDt;
    }

    public void setJoinScheduleDt(Date joinScheduleDt) {
        this.joinScheduleDt = joinScheduleDt;
    }

    public Integer getScheduleWeekNum() {
        return this.scheduleWeekNum;
    }

    public void setScheduleWeekNum(Integer scheduleWeekNum) {
        this.scheduleWeekNum = scheduleWeekNum;
    }

    public Date getScheduleDt() {
        return this.scheduleDt;
    }

    public void setScheduleDt(Date scheduleDt) {
        this.scheduleDt = scheduleDt;
    }

    public Boolean getFinish() {
        return this.finish;
    }

    public void setFinish(Boolean finish) {
        this.finish = finish;
    }

    public Date getFinishDt() {
        return this.finishDt;
    }

    public void setFinishDt(Date finishDt) {
        this.finishDt = finishDt;
    }

    public Boolean getAutoContinue() {
        if (autoContinue == null) {
            this.autoContinue = false;
        }
        return this.autoContinue;
    }

    public void setAutoContinue(Boolean autoContinue) {
        this.autoContinue = autoContinue;
    }

    public Date getCreatedDt() {
        return this.createdDt;
    }

    public void setCreatedDt(Date createdDt) {
        this.createdDt = createdDt;
    }

    public Date getUpdatedDt() {
        return this.updatedDt;
    }

    public void setUpdatedDt(Date updatedDt) {
        this.updatedDt = updatedDt;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


}
